package com.example.administrator.yuejian2.adapter;

import android.support.v7.widget.RecyclerView;
import android.util.Log;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.administrator.yuejian2.R;
import com.example.administrator.yuejian2.bean.ClubBean;
import com.example.administrator.yuejian2.bean.MultipleItem;

import java.util.List;

public class MultipleItemQuickAdapter extends BaseMultiItemQuickAdapter<MultipleItem,BaseViewHolder> {


    public MultipleItemQuickAdapter(List data) {
        super(data);
        addItemType(MultipleItem.FIRST_TYPE, R.layout.club_item);
        addItemType(MultipleItem.SECOND_TYPE, R.layout.acitivity_item);
        addItemType(MultipleItem.NORMAL_TYPE, R.layout.share_item);

    }


    @Override
    protected void convert(BaseViewHolder helper, MultipleItem item) {
        switch (helper.getItemViewType())
        {
            case MultipleItem.FIRST_TYPE:
//                helper.setText(R.id.club_name,item.getActivityBean().getActivity_title());
                break;
            case MultipleItem.SECOND_TYPE:
      //          helper.setText(R.id.activity_name,item.getSharePictureBean().getPicture_time());
                break;
            case MultipleItem.NORMAL_TYPE:
                helper.setText(R.id.share_picture_title,item.getData().getClub_name());
                break;

        }
    }
}
